 for x in range(0,101):
    for y in range(0,101):
        if x*3 + y*5 + (100-x-y)/3 == 100:
            print('有%d只公鸡,%d只母鸡,%d只小鸡' %(x,y,100-x-y))